/*
 * Double ended queue
 */

#define NMAX 500000

extern struct Dequeue {
	int data[NMAX];
	int head;
	int size;
};


extern void
Clear(struct Dequeue * d);



extern void
PushFront(struct Dequeue * d);



extern void
PushBack(struct Dequeue * d);



extern int
PopFront(struct Dequeue * d);



extern int
PopFront(struct Dequeue * d);



extern int
Front(const struct Dequeue * d);



extern int
Back(const struct Dequeue * d);



extern unsigned char
IsEmpty(const struct Dequeue * d);
